<%@page import="edu.mta.pokerstats.Player"%>
<%@page import="htmlWriter.HtmlWriter"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<% HtmlWriter htmlWriter = new HtmlWriter(); 
	if(session.getAttribute("viewingPlayer") == null)
	{
%>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/homeScript.js"></script>
<title>PokerStats</title>
</head>
<body>
        <div id="LinkLogin">
            <button id="ButtonLogInPage" onclick="homeNavigationButtonClicked('LogInPage','#ButtonLogInPage')">Login Page</button>
	</div>
	<div id="banner">
		<a href="index.jsp"><img src="res/img/logo.png" /></a>
	</div>
	<div class="menu">
		<ul>
			<li class="menuItem">
				<button class="ButtonNavigationNotClicked" id="ButtonGeneralInformation" onclick="homeNavigationButtonClicked('HoldemGeneral','#ButtonGeneralInformation')">
					<img src="res/img/spades.png" /> General information
					<img src="res/img/spades.png" />
                                </button>
			</li>
			<li class="menuItem">
				<button class="ButtonNavigationNotClicked" id="ButtonRules" onclick="homeNavigationButtonClicked('HoldemRules', '#ButtonRules')">
					<img src="res/img/hearts.png" /> Rules
					<img src="res/img/hearts.png" />
				</button>
			</li>
			<li class="menuItem">
				<button class="ButtonNavigationNotClicked" id="ButtonHandRanking" onclick="homeNavigationButtonClicked('HandRankings', '#ButtonHandRanking')">
					<img src="res/img/clubs.png" /> Hand ranking
					<img src="res/img/clubs.png" />
				</button>
			</li>
			<li class="menuItem">
				<button class="ButtonNavigationNotClicked" id="ButtonAboutUs" onclick="homeNavigationButtonClicked('AboutUs', '#ButtonAboutUs')">
					<img src="res/img/Diamonds.png" /> About us
					<img src="res/img/Diamonds.png" />
				</button>
			</li>
		</ul>
	</div>
	<div id="DivMainContainer">
		<%=htmlWriter.LogInPage() %>
	</div>
</body>
</html>
<%
		}
	else
	{
		Player viewingPlayer = (Player)session.getAttribute("viewingPlayer");
		out.println(htmlWriter.MainPage(viewingPlayer.getId()));
	}
%>